package com.cccyy.kong;

import com.cccyy.openapi.UserEntity;

public class Kong {
    public static void main(String[] args) {
        testStrNull();
        testNewObject();
    }

    private static void testStrNull() {
        String str = null;
        if (str != null) {
            System.out.println("TRUE");
        } else {
            System.out.println("FALSE");
        }
    }

    private static void testNewObject() {
        UserEntity userEntity = new UserEntity();
        //会报空指针
//        if (userEntity.getPhone().equals("")) {
//            System.out.println("对象参数不为空");
//        } else {
//            System.out.println("对象参数为空");
//        }

        userEntity = null;
        if (userEntity != null) {
            System.out.println("对象不为空");
        } else {
            System.out.println("对象为空");
        }
    }
}
